import java.awt.CardLayout;
import java.awt.GridBagConstraints;
import java.awt.GridLayout;
import java.awt.Insets;
import java.awt.Panel;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.SwingConstants;


public class MatchScehdule {

	private JTextField txtSuwonVsSeoul;
	private JTextField textField;
	private JTextField txtBusanVsPohang;
	private JTextField textField_2;
	private JTextField txtSuwonVsBusan;
	private JTextField textField_3;
	private JPanel MatchPanel;
	public final MainPanel mp = new MainPanel();
	
	public MatchScehdule() {
		
		MatchPanel = new JPanel();
		
		
		//frame.add(MatchPanel, gbc_MatchPanel);
		MatchPanel.setLayout(new GridLayout(3, 1));
		
		txtSuwonVsSeoul = new JTextField();
		txtSuwonVsSeoul.setEditable(false);
		txtSuwonVsSeoul.setHorizontalAlignment(SwingConstants.CENTER);
		txtSuwonVsSeoul.setText("Suwon vs Seoul");
		MatchPanel.add(txtSuwonVsSeoul);
		txtSuwonVsSeoul.setColumns(10);
		
		txtBusanVsPohang = new JTextField();
		txtBusanVsPohang.setEditable(false);
		txtBusanVsPohang.setHorizontalAlignment(SwingConstants.CENTER);
		txtBusanVsPohang.setText("Busan vs Pohang\r\n");
		MatchPanel.add(txtBusanVsPohang);
		txtBusanVsPohang.setColumns(10);
		
		txtSuwonVsBusan = new JTextField();
		txtSuwonVsBusan.setEditable(false);
		txtSuwonVsBusan.setHorizontalAlignment(SwingConstants.CENTER);
		txtSuwonVsBusan.setText("Suwon vs Busan");
		MatchPanel.add(txtSuwonVsBusan);
		txtSuwonVsBusan.setColumns(10);
		
		textField = new JTextField();
		textField.setEditable(false);
		textField.setHorizontalAlignment(SwingConstants.CENTER);
		textField.setText("18:00");
		MatchPanel.add(textField);
		textField.setColumns(10);
		
		textField_2 = new JTextField();
		textField_2.setEditable(false);
		textField_2.setHorizontalAlignment(SwingConstants.CENTER);
		textField_2.setText("19:00");
		MatchPanel.add(textField_2);
		textField_2.setColumns(10);
		
		textField_3 = new JTextField();
		textField_3.setEditable(false);
		textField_3.setHorizontalAlignment(SwingConstants.CENTER);
		textField_3.setText("20:00");
		MatchPanel.add(textField_3);
		textField_3.setColumns(10);
		
		JButton btnTicketing = new JButton("Ticket");
		MatchPanel.add(btnTicketing);
		
		JButton btnTicketing1 = new JButton("Ticket");
		MatchPanel.add(btnTicketing1);
		
		JButton btnTicketing2 = new JButton("Ticket");
		MatchPanel.add(btnTicketing2);
		
		btnTicketing.addActionListener(new ActionListener(){
			public void actionPerformed(ActionEvent arg0) {
				//cardLayoutTicket.next(cardTicketPanel);
				mp.cardLayoutTicket.next(mp.cardTicketPanel);
			}
		});
	}
	
	public JPanel matchschehdule() {
		return MatchPanel;
		
	}
}
